<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
		<title>编辑学员信息</title>
		<link rel="stylesheet" href="../../lib/layui/css/layui.css" />
		<!--<link rel="stylesheet" type="text/css" href="../../lib/layui/css/scroll-bar.css"/>-->
		<style>
			.layui-form-item {
				margin-bottom: -10px;
				clear: both;
				*zoom: 1;
			}
		
			.layui-input,
			.layui-textarea,
			.layui-select {
				height: 31px;
				line-height: 1.3;
				line-height: 38px\9;
				border-width: 1px;
				border-style: solid;
				background-color: #fff;
				border-radius: 2px;
				marign-top:-10px!important;
			}
		</style>
	</head>
	<body id="aaa" class="layui-layout-body" />
	<form class="layui-form" action="">
		<div class="layui-form-item">
			<label class="layui-form-label"><span class="require-icon">*</span>ID</label>
			<div class="layui-input-inline">
				<input type="text" name="id" placeholder="请输入ID" class="layui-input id" disabled="">
			</div>
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label"><span class="require-icon">*</span>账号</label>
			<div class="layui-input-inline">
				<input type="text" name="account" placeholder="请输入账号" class="layui-input account">
			</div>
		</div>
		<!--姓名-->
		<div class="layui-form-item">
			<label class="layui-form-label"><span class="require-icon">*</span>姓名</label>
			<div class="layui-input-inline">
				<input type="text" name="name" placeholder="请输入姓名" autocomplete="off" class="layui-input name">
			</div>
		</div>
		<!--性别-->
		<div class="layui-form-item">
			<label class="layui-form-label"><span class="require-icon">*</span>性别</label>
			<div class="layui-input-block">
				<input type="radio" name="sex" value="0" title="男" class="xbxz">
				<input type="radio" name="sex" value="1" title="女" checked class="xbxz">
			</div>
		</div>
		<!--年龄-->
		<div class="layui-form-item">
			<label class="layui-form-label"><span class="require-icon">*</span>年龄</label>
			<div class="layui-input-inline">
				<input type="text" name="age" placeholder="请输入年龄" autocomplete="off" class="layui-input age">
			</div>
		</div>
		<!--出生年月-->
		<div class="layui-form-item">
			<label class="layui-form-label"><span class="require-icon">*</span>出生年月</label>
			<div class="layui-input-inline">
				<input type="text" name="birthday" class="layui-input birthday">
			</div>
		</div>
		<!--毕业院校-->
		<div class="layui-form-item">
			<label class="layui-form-label"><span class="require-icon">*</span>毕业院校</label>
			<div class="layui-input-inline">
				<input type="text" name="school" placeholder="请输入毕业院校" class="layui-input school">
			</div>
			<!--<div class="layui-form-mid layui-word-aux">请务必填写正确的身份证号码！</div>-->
		</div>
		<!--身份证号码-->
		<div class="layui-form-item">
			<label class="layui-form-label"><span class="require-icon">*</span>身份证号</label>
			<div class="layui-input-inline">
				<input type="text" name="idCard" placeholder="请输入身份证号码" class="layui-input idCard">
			</div>
			<!--<div class="layui-form-mid layui-word-aux">请务必填写正确的身份证号码！</div>-->
		</div>
		<!--联系方式-->
		<div class="layui-form-item">
			<label class="layui-form-label"><span class="require-icon">*</span>联系方式</label>
			<div class="layui-input-inline">
				<input type="text" name="phone" placeholder="请输入手机号码" class="layui-input phone">
			</div>
			<!--<div class="layui-form-mid layui-word-aux">请务必填写正确的身份证号码！</div>-->
		</div>
		<!--地址-->
		<div class="layui-form-item">
			<label class="layui-form-label"><span class="require-icon">*</span>家庭地址</label>
			<div class="layui-input-inline">
				<input type="text" name="address" class="layui-input address">
			</div>
		</div>
		<!--所在公式-->
		<div class="layui-form-item">
			<label class="layui-form-label"><span class="require-icon">*</span>所在公司</label>
			<div class="layui-input-inline">
				<input type="text" name="company" class="layui-input company">
			</div>
		</div>
		<!--公司职位-->
		<div class="layui-form-item">
			<label class="layui-form-label">公司职位</label>
			<div class="layui-input-inline">
				<input type="text" name="job" class="layui-input job">
			</div>
		</div>
		<!--英语等级-->
		<div class="layui-form-item">
			<label class="layui-form-label"><span class="require-icon">*</span>英语等级</label>
			<div class="layui-input-inline">
				<input type="text" name="englishLevel" class="layui-input englishLevel">
			</div>
		</div>

		<!--<div class="layui-form-item">
						<label class="layui-form-label"><span class="require-icon">*</span>所在公司</label>
						<div class="layui-input-inline">
							<input type="text" name="company" class="layui-input company">
						</div>
					</div>-->
		<div class="layui-form-item">
			<label class="layui-form-label"><span class="require-icon">*</span>所在地止</label>
			<div class="layui-input-inline">
				<input type="text" name="seat" class="layui-input seat">
			</div>
		</div>

		<!--民zu-->
		<div class="layui-form-item">
			<label class="layui-form-label"><span class="require-icon">*</span>民族</label>
			<div class="layui-input-inline">
				<input type="text" name="nation" class="layui-input nation">
			</div>
		</div>

		<div class="layui-form-item">
			<label class="layui-form-label"><span class="require-icon">*</span>身高</label>
			<div class="layui-input-inline">
				<input type="text" name="height" class="layui-input height">
			</div>
		</div>

		<div class="layui-form-item">
			<label class="layui-form-label"><span class="require-icon">*</span>体重</label>
			<div class="layui-input-inline">
				<input type="text" name="weight" class="layui-input weight">
			</div>
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label"><span class="require-icon">*</span>职级</label>
			<div class="layui-inline">
				<select class="layui-input aditRank" name="aditRank">
					<!--<option value="">请选择职级</option>-->
					<!--<option value="">语文</option>-->
					<!--<option value="">语文</option>-->
				</select>
			</div>
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label"><span class="require-icon">*</span>血型</label>
			<div class="layui-input-inline">
				<input type="text" name="blood" class="layui-input blood">
			</div>
		</div>

		<div class="layui-form-item">
			<label class="layui-form-label"><span class="require-icon">*</span>星座</label>
			<div class="layui-input-inline">
				<input type="text" name="constellation" class="layui-input constellation">
			</div>
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label"><span class="require-icon">*</span>培训状态</label>
			<div class="layui-input-inline">
				<input type="text" name="status" class="layui-input status" disabled="">
			</div>
		</div>

		<div class="layui-form-item">
			<label class="layui-form-label"><span class="require-icon">*</span>邮箱</label>
			<div class="layui-input-inline">
				<input type="text" name="email" class="layui-input email">
			</div>
		</div>
		<!--<div class="layui-form-item">
						<label class="layui-form-label"><span class="require-icon">*</span>头像</label>
						<div class="layui-input-inline">
							<input type="text" name="head-img" class="layui-input head-img">
						</div>
					</div>-->
		<!--<div class="layui-form-item">
						<label class="layui-form-label"><span class="require-icon">*</span>备注</label>
						<div class="layui-input-inline">
							<input type="text" name="note" class="layui-input note">
						</div>
					</div>-->

		<div class="layui-form-item">
			<div class="layui-input-block">
				<button class="layui-btn studentAdit" lay-submit="" lay-filter="studentAdit">确定修改</button>
				<button type="reset" class="layui-btn layui-btn-primary">重置</button>
			</div>
		</div>

	</form>
	<script src='../../static/js/jquery.1.11.1.js'></script>
	<script src="../../static/js/public.js"></script>
	<script src="../../lib/layui/layui.js"></script>
	<!--<script src="js/classStudents.js"></script>-->
	<script src="../../static/js/canc-studentsFile.js"></script>
	<script>
		//确定提交
		layui.use(['laydate', 'form', 'layer'], function() {
			var laydate = layui.laydate;
			var form = layui.form;
			var layer = layui.layer;
			laydate.render({
				elem: '.createTime'
			});
			laydate.render({
				elem: '.updateTime'
			});
			form.on('submit(studentAdit)', function(data) {
				//						layer.alert(JSON.stringify(data.field), {
				//							title: '最终的提交信息'
				//						})
				var dataAll = data.field;
				var id = dataAll.id;
				var name = dataAll.name;
				var account = dataAll.account;
				var gender = dataAll.gender;
				var age = dataAll.age;
				var birthday = dataAll.birthday;
				var school = dataAll.school;
				//					var sfz = dataAll.sfz;
				var phone = dataAll.phone;
				var address = dataAll.address;
				var company = dataAll.company;
				var job = dataAll.job;
				var idCard = idCard;
				var englishLevel = dataAll.englishLevel;
				var seat = dataAll.seat;
				var nation = dataAll.nation;
				var height = dataAll.height;
				var weight = dataAll.weight;
				var head = '1';
				var rank = dataAll.aditRank;
				var blood = dataAll.blood;
				var constellation = dataAll.constellation;
				var status = dataAll.status;
				var email = dataAll.email;
				var note = '1';
				var password = '1';
				var param1 = {
					id: id,
					account: account,
					name: name,
					age: age,
					gender: gender,
					birthday: birthday,
					idCard: idCard,
					address: address,
					company: company,
					job: job,
					school: school,
					englishLevel: englishLevel,
					rank: rank,
					seat: seat,
					nation: nation,
					height: height,
					weight: weight,
					blood: blood,
					constellation: constellation,
					head: head,
					status: status,
					liaison: phone,
					email: email,
					password: password,
					note: note,
				}
				var param = Object.assign(publicParam, param1);
				param = JSON.stringify(param);
				var url = path + "/student/updateStudent";
				$.ajax({
					type: "post",
					url: url,
					dataType: "json",
					async: false,
					//			data:{},
					//						 scrollbar: true,
					data: {
						param: param
					},
					success: function(data) {
						alert('修改成功!');
						form.Reset();
						layer.close(iframeIndex);
						//						parent.layer.closeAll();

					},
					error: function(data) {
						// alert(data);
						alert('修改失败!')
					}
				})
				return false;
			});
		})
	</script>
	</body>

</html>